package net.display;

import javax.servlet.http.HttpServletRequest;

import org.apache.catalina.util.MD5Encoder;

import sun.security.provider.MD5;
import net.bo.KPlan;
import net.ko.displays.KObjectDisplay;
import net.ko.http.objects.KRequest;
import net.ko.http.views.KPageList;
import net.ko.kobject.KObject;

public class DisplayDetailPlan extends KObjectDisplay {

	@Override
	public void beforeLoading(Class<? extends KObject> clazz, KPageList list,
			HttpServletRequest request) {
		String idPlan=KRequest.GETPOST("id", request);
		list.addWhere("id="+idPlan);
		super.beforeLoading(clazz, list, request);
	}

	@Override
	public String showInList(KObject ko, String memberName,HttpServletRequest request) {
		String res = super.showInList(ko, memberName,request);
		KPlan plan = (KPlan)ko;
		if("libelle".equals(memberName)){
			res="<div align='center'>"+plan.getLangage()+"</div>";
		}
		return res;
	}
	
	
}
